#pragma once

#include "fwd.h"


namespace evm { namespace messaging {

struct BaseDispatcher {
    BaseDispatcher(Endpoints endpoints)
        : endpoints(endpoints) {}

    virtual ListenerPtr listen(TransportPtr transport) = 0;

    virtual void operator ()(IncomingMsgPtr incoming) = 0;

protected:
    Endpoints endpoints;
};

using DispatcherPtr = shared_ptr<BaseDispatcher>;

}}
